/*     */ package com.zimbra.cs.lmtpserver;
/*     */ 
/*     */ import com.zimbra.common.localconfig.KnownKey;
/*     */ import com.zimbra.common.localconfig.LC;
/*     */ import com.zimbra.common.service.ServiceException;
/*     */ import com.zimbra.common.util.Log;
/*     */ import com.zimbra.common.util.ZimbraLog;
/*     */ import com.zimbra.cs.account.Config;
/*     */ import com.zimbra.cs.server.ServerConfig;
/*     */ import com.zimbra.cs.util.BuildInfo;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class LmtpConfig
/*     */   extends ServerConfig
/*     */ {
/*     */   private final LmtpBackend lmtpBackend;
/*     */   private static final String PROTOCOL = "LMTP";
/*     */   private static final int MAX_IDLE_TIME = 300;
/*  44 */   public static final LmtpConfig INSTANCE = new LmtpConfig();
/*     */   
/*     */   public static LmtpConfig getInstance() {
/*  47 */     return INSTANCE;
/*     */   }
/*     */   
/*     */   private LmtpConfig() {
/*  51 */     super("LMTP", false);
/*  52 */     this.lmtpBackend = new ZimbraLmtpBackend(this);
/*     */   }
/*     */   
/*     */   public String getServerName()
/*     */   {
/*  57 */     return getAttr("zimbraLmtpAdvertisedName", LC.zimbra_server_hostname.value());
/*     */   }
/*     */   
/*     */   public String getServerVersion()
/*     */   {
/*  62 */     return getBooleanAttr("zimbraLmtpExposeVersionOnBanner", false) ? BuildInfo.VERSION : null;
/*     */   }
/*     */   
/*     */ 
/*     */   public int getMaxIdleTime()
/*     */   {
/*  68 */     return 300;
/*     */   }
/*     */   
/*     */   public int getShutdownTimeout()
/*     */   {
/*  73 */     return getIntAttr("zimbraLmtpShutdownGraceSeconds", super.getShutdownTimeout());
/*     */   }
/*     */   
/*     */   public int getMaxThreads()
/*     */   {
/*  78 */     return getIntAttr("zimbraLmtpNumThreads", super.getMaxThreads());
/*     */   }
/*     */   
/*     */   public int getBindPort()
/*     */   {
/*  83 */     return getIntAttr("zimbraLmtpBindPort", 7025);
/*     */   }
/*     */   
/*     */   public String getBindAddress()
/*     */   {
/*  88 */     return getAttr("zimbraLmtpBindAddress", null);
/*     */   }
/*     */   
/*     */   public Log getLog()
/*     */   {
/*  93 */     return ZimbraLog.lmtp;
/*     */   }
/*     */   
/*     */   public String getConnectionRejected()
/*     */   {
/*  98 */     return "421 " + getDescription() + " closing connection; service busy";
/*     */   }
/*     */   
/*     */   public String getMtaRecipientDelimiter() {
/*     */     try {
/* 103 */       return getGlobalConfig().getAttr("zimbraMtaRecipientDelimiter");
/*     */     } catch (ServiceException e) {
/* 105 */       getLog().warn("Unable to get global attribute: zimbraMtaRecipientDelimiter", e); }
/* 106 */     return null;
/*     */   }
/*     */   
/*     */   public LmtpBackend getLmtpBackend()
/*     */   {
/* 111 */     return this.lmtpBackend;
/*     */   }
/*     */   
/*     */   public boolean isPermanentFailureWhenOverQuota() {
/* 115 */     return getBooleanAttr("zimbraLmtpPermanentFailureWhenOverQuota", false);
/*     */   }
/*     */   
/*     */   public boolean isTLSEnforcedByServer() {
/* 119 */     return LC.zimbra_require_interprocess_security.booleanValue();
/*     */   }
/*     */   
/*     */   public boolean isLHLORequired() {
/* 123 */     return getBooleanAttr("zimbraLmtpLHLORequired", true);
/*     */   }
/*     */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/lmtpserver/LmtpConfig.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */